package com.lynn.salary.web.interceptor;

import com.lynn.salary.pojo.LoginUser;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.AbstractInterceptor;

public class FrontEndLoginInterceptor extends AbstractInterceptor {

	@Override
	public String intercept(ActionInvocation arg0) throws Exception {
		LoginUser u = (LoginUser)arg0.getInvocationContext().getSession().get("frontEndLoginUser");
		if(u == null) {
			System.out.println("拦截前台未登录操作...");
			return "frontEndRelogin";
		}
		return arg0.invoke();
	}

}
